<?php
function getShippingDetails()
{
	$tables = array();
	$tables[0] = 'ex_shipping';
	
	$fields = array();
	$fields[0] = 'shipName';
	$fields[1] = 'shipTime';
	$fields[2] = 'perPair';
	
	$whereClause = '`order` > 0 ORDER BY `order` ASC';
	
	$data = SQLRecover($tables, $fields, $whereClause);
	$return = '';
	for ($i=0; $i<sizeOf($data['perPair']); $i++)
	{
		$j = $i % 2;
		$stripe = ($j == 0 ? ' strip1' : '');
		$return .= '
		<tr>
			<td class="tdLeft'.$stripe.'">
				'.$data['shipName'][$i].'
			</td>
			<td class="tdMid'.$stripe.'">
				'.$data['shipTime'][$i].'
			</td>
			<td class="tdRight'.$stripe.'">
				PHP '.number_format($data['perPair'][$i], 2, '.', ',').' per pair
			</td>
		</tr>
		';
	}
	return $return;
}
	function displayPage()
	{
		$output = '
		<div id="mainDiv" class="container_12">
			<div class="grid_12">
				<h2>Shipping</h2>
			</div>
			<div class="clear">
			<!--spanner-->
			</div>
			<div id="linkList" class="grid_3">
				<ul>
					<li><a href="'.INDEX.'about">About</a></li>
					<li><a href="'.INDEX.'guide">Size Guide</a></li>
					<li><a href="'.INDEX.'shipping">Shipping</a></li>
					<li><a href="'.INDEX.'terms">Terms &amp; Conditions</a></li>
					<li><a href="'.INDEX.'contact">Contact Us</a></li>
				</ul>
			</div>
			<div id="contentList" class="grid_9"'.(get('jump') == 1 ? ' alt="mainDelPg"' : '').'>
				<div id="mainDelPg" class="contentBox killborder">
				<h3>Shipping Terms</h3>
					Once we have received the full payment of your total bill, we will send you an email informing you that your shoes are ready for pick up of have been shipped out.

				</div>
				<div id="cPickupC" class="contentBox">
					<h3>Customer Pickup</h3>
					Our address for pick up is at:<br /><b>7 Makaturing Street, Corner Banawe Avenue, Quezon City, 1115</b><br /><br />
					<iframe id="googleMap" width="680" height="350" frameborder="0" scrolling="no" marginheight="0" marginwidth="0" src="http://maps.google.com/maps/ms?ie=UTF8&amp;msa=0&amp;msid=215691590243574531576.0004a1e6d90c3af318880&amp;ll=14.642303,121.002474&amp;spn=0.014533,0.032616&amp;z=15&amp;output=embed"></iframe>
					<br /><br />
					Click <a href="http://maps.google.com/maps/ms?ie=UTF8&source=embed&msa=0&msid=215691590243574531576.0004a1e6d90c3af318880&ll=14.640995,120.999749&spn=0.011003,0.026543&z=16" target="_blank"><b>here</b></a> for a larger map.<br /><br />
				</div>
				<div id="dServiceC" class="contentBox">
					<a name="delivC"></a>
					<h3>Delivery Service</h3>
					'.staticTextDiv('delSvc','Delivery Service').'
					<table>
					<tr>
						<td class="headerT">
							Location
						</td>
						<td class="headerT" colspan="2">
							Standard Delivery Time and Costs
						</td>
					</tr>
					'.getShippingDetails().'
					</table>
					<br /><br />
					To track your order, please enter your tracking (waybill) number in the appropriate field in the Xend&trade; Website.<br /><br />
					<a href="http://www.xend.com.ph/Default.aspx" target="_blank"><img src="./img/shipping/xend.jpg" /></a><br /><br />
				</div>
			</div>
		</div>
		';
		return $output;
	}
?>